﻿
namespace mal.web.Balades.Business.UnitTest.Bootstrap
{
    class VisitBootstrap : BootstrapBase
    {
        #region Fields

        #endregion

        #region Construction / Destruction

        #endregion

        #region enum, struct, class

        #endregion

        #region Properties
        public const int NumberOfVisits = 10;
        
        #endregion

        #region Methods
        public override void Fill()
        {
            this.ExecuteQuery("DBCC CHECKIDENT (balades_visit, reseed, 0)");

            for (int i = 0; i < NumberOfVisits; i++)
            {
                this.ExecuteQuery(@"insert balades_Visit(Title, UrlName, SumUp,[Text])
	                values('Visit {0}','Visit{0}','Sump up {0}', 'Text {0}' )", i + 1);

                if (i < 5)
                {
                    this.ExecuteQuery(@"insert balades_VisitQuality(VisitId ,SumUp ,[Text] ,
		             Gps ,Pictures ,Informations ,Categories )
	                values({0},	1,	1, 1, 1, 1, 1)", i + 1);
                }
            }
        }

        public override void Clean()
        {
            this.ExecuteQuery("Delete balades_visitquality");
            this.ExecuteQuery("Delete balades_visit");
        }
        #endregion

        #region Events

        #endregion



    }
}
